$(function() {
	$("#login_form").validate({
		errorPlacement:function(error, element) {
			element.attr("placeholder", $(error).text());
		},
		rules: {
			"j_username": {
				required: true
			},
			"j_password": {
				required: true
			},
			"verifycode": {
				required: true,
				maxlength: 4
			},
		},
		messages: {
			"j_username": {
				required: "请输入用户名"
			},
			"j_password": {
				required: "请输入密码"
			},
			"verifycode": {
				required: "请输入验证码"
			}
		}
	});
});
